We remind here the expression of the curvature for a given set of parametric equations $(x(t), y(t))$ : $$ c(t) = \frac{x'(t) y''(t) - y'(t) x''(t) }{\left(x'(t)^2 + y'(t)^2 \right)^{3/2}}$$
Let : $$ x(t) = t R_0 \cos\frac{\pi}{4}$$ $$ y(t) = 2 R_0 \mathrm{sech}\left( \frac{x(t)}{R_0} \right) = \frac{2 R_0}{\cosh\left( \frac{x(t)}{R_0} \right)}$$
In [11]:
from sympy import *
For a nice $\LaTeX$ printing :
In [12]:
init_printing()
Defining the symbolic notations :
In [13]:
t, r, a, b = symbols('t r a b')
In [14]:
x = -r * sin(t*pi/4)
y = a/cosh(sin(t*pi/4))+b
In [25]:
(diff(y,t)+1).subs(t,-1)
Out[25]:
In [26]:
solve(_, a)
Out[26]:
Calculating the differential expressions
In [49]:
xp = diff(x, t)
yp = diff(y, t).simplify()
xpp = diff(xp, t)
ypp = diff(yp, t).simplify()
In [50]:
xp, yp, xpp, ypp
Out[50]:
In [51]:
curvature = (xp * ypp - yp * xpp) / (xp**2 + yp**2)**Rational(3,2)
In [52]:
curvature
Out[52]:
In [53]:
curvature.simplify()
Out[53]:
In [54]:
equa = r*cosh(a*t) - 1/curvature
In [55]:
equa.simplify()
Out[55]:
In [56]:
u = symbols('u')
diff(1/cosh(a*u), u)
Out[56]:
In [23]:
sinh(-u)
Out[23]:
In [27]:
cosh(-u)
Out[27]:
In [58]:
1/cosh(-sqrt(2)/2)
Out[58]:
In [64]:
f = Function('f')(t)
diff(a/cosh(f/r)+b, t)
Out[64]:
In [70]:
diff(-r*sin(t*pi/4),t)
Out[70]:
In [71]:
cosh(a)**2/sinh(a)
Out[71]:
In [74]:
expand(_)
Out[74]:
In [77]:
cosh(sqrt(2)/2)
Out[77]:
In [ ]: